
#ifndef SPI_DRIVER_H
#define SPI_DRIVER_H

#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <fcntl.h>
#include <unistd.h>
#include <linux/spi/spidev.h>
#include <sys/ioctl.h>


#define SPI_DEVICE_PATH "/dev/spidev0.0"

int SPI_Open(void);
int SPI_Transfer(int spi_file,uint8_t *tx_data, uint16_t len);
int SPI_Receive(int spi_file, uint8_t *rx_data, uint16_t len);
int SPI_Close(int spi_file);



#endif /* SPI_DRIVER_H */

